import { App } from 'vue';
import http from '../utils/http';
import { AxiosPromise } from 'axios';

declare module '@vue/runtime-core' {
  interface ComponentCustomProperties {
    $axios?: (config: any) => AxiosPromise;
  }
}
export const axiosPlugin = {
  install(app: App): void {
    app.config.globalProperties.$axios = http;
  },
};
export default axiosPlugin;
